
/* 这里面要导入想要跳转的页面 */
/* 依赖下载是这个:npm install --save vue-router@4 */
/* 改用Router-view路由方式 */

import { createRouter, createWebHashHistory } from 'vue-router';

const routes = [
  {
    path: '/',
    component: () => import('../src/views/login.vue'),
  },
  // 使用 Layout 作为包裹组件
  {
    path: '/app',
    component: () => import('../src/components/LayoutHead.vue'), 
    children: [
      {
        path: 'Data_Retrieval',
        component: () => import('../src/views/Retrieval/Data_Retrieval.vue'),
      },
      {
        path: 'Analyse',
        component: () => import('../src/views/Dispose/Analyse.vue'),
      },
      {
        path: 'Model_Training',
        component: () => import('../src/views/Models/Model_Training.vue'),
        children: [
          {
            path: '',
            component: () => import('../src/views/Models/Bottom/UsageOverview.vue'),
          },
          {
            path: 'general',
            component: () => import('../src/views/Models/Bottom/UsageOverview.vue'),
          },
          {
            path: 'annotation',
            component: () => import('../src/views/Models/Bottom/SampleLabeling.vue'),
          },
          {
            path: 'manage',
            component: () => import('../src/views/Models/Bottom/SampleManagement.vue'),
          },
          {
            path: 'ModelTraining',
            component: () => import('../src/views/Models/Bottom/PatternTraining.vue'),
          },
          {
            path: 'ManagingModels',
            component: () => import('../src/views/Models/Bottom/ModelManager.vue'),
          },
        ],
      },
      {
        path: 'Application_Space',
        component: () => import('../src/views/Space/Application_Space.vue'),
      },
    ],
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;














